package com.kgc.springboot.aviation.service.lvwenjia.impl;

import com.kgc.springboot.aviation.mapper.LawsMapper;
import com.kgc.springboot.aviation.pojo.Laws;
import com.kgc.springboot.aviation.pojo.LawsExample;
import com.kgc.springboot.aviation.service.lvwenjia.LawsServices;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author shkstart
 * @create 2020-12-30 15:19
 */
@Service
public class LawsServicesImpl implements LawsServices {
    @Resource
    LawsMapper lawsMapper;
    @Override
    public List<Laws> getLawsList(String lawsName) {
        LawsExample lawsExample=new LawsExample();
        if(!lawsName.equals("")){
            lawsExample.createCriteria().andLawsNameEqualTo(lawsName);
        }
        List<Laws> laws = lawsMapper.selectByExample(lawsExample);
        return laws;
    }
}
